// #########################################################################################
// Projeto: REIVAX
// Modulo : SIGAPCO
// Fonte  : REI57G01
// ---------+--------------------+-----------------------------------------------------------
// Data     | Autor              | Descricao
// ---------+--------------------+-----------------------------------------------------------
// 30/06/14 | DFR - DANILO RAMOS | Gatilho para o Ponto de Lan�amento 000082
// ---------+--------------------+-----------------------------------------------------------

#include "rwmake.ch"

//------------------------------------------------------------------------------------------
/*/ {Protheus.doc} 
Gatilho para o Ponto de Lan�amento 000082

@author    DFR | Danilo Ramos 
@version   1.00
@since     30/06/2014
/*/
//------------------------------------------------------------------------------------------
user function REI57G01(_sAKCTIPO)
	//--< vari�veis >---------------------------------------------------------------------------
	Local _sPCOFIL := GetMV('REI_PCOFIL')
	Local _nValor  := 0
	
	//--< procedimentos >-----------------------------------------------------------------------
	
	if (CT2->CT2_FILIAL $ _sPCOFIL)
	
		//Carrega somente o tipo de saldo igual a 1 (Realizado)
		if (CT2->CT2_TPSALD == '1')
			if (_SAKCTIPO == 'C')
			
				if (LEFT(CT2->CT2_CREDIT,1) $ "3/4")
					_nValor := CT2->CT2_VALOR
				EndIf
			
			ElseIf (_SAKCTIPO == 'D')
			
				if (LEFT(CT2->CT2_DEBITO,1) $ "3/4")
					_nValor := CT2->CT2_VALOR
				EndIf
			
			EndIf
			
		EndIf
	
	EndIf
	
return _nValor
//--< fim de arquivo >----------------------------------------------------------------------
